[mirrors]
https://github.com/magnumripper/JohnTheRipper/archive/1.8.0.6-jumbo-1.tar.gz

[vars]
filesize=32760152
sha512=146d3f8ec9304357938ec3a447221828fb52fb4d5045082f0559e7220f689ea87c6ef9c0ae4ccd386f7bc2db6290fbf708f4c04e4437b37921410c1eb4c47ac4
tarball=JohnTheRipper-1.8.0.6-jumbo-1.tar.gz
tardir=JohnTheRipper-1.8.0.6-jumbo-1
desc='password hash cracker'

[deps]
libressl

[build]
#patch -p1 < "$K"/some.patch

cd src

[ -n "$CROSS_COMPILE" ] && \
  xconfflags="--host=$($CC -dumpmachine|sed 's/musl/gnu/') \
  --with-sysroot=$butch_root_dir"

CPPFLAGS="-D_GNU_SOURCE" CFLAGS="$optcflags" CXXFLAGS="$optcflags" \
LDFLAGS="$optldflags -Wl,-rpath-link=$butch_root_dir$butch_prefix/lib" \
  ./configure -C --prefix="$butch_prefix" --disable-nls $xconfflags

#[ -n "$CROSS_COMPILE" ] && "$K"/libtool.cross.gen --sysroot="$butch_root_dir"

make V=1 -j$MAKE_THREADS LIBS="-lssl -lcrypto"
cd ..

dest="$butch_install_dir""$butch_prefix"
mkdir -p "$dest"/share/john "$dest"/bin
for i in run doc README* ; do
	cp -ra "$i" "$dest"/share/john/
done
cat << EOF > "$dest"/bin/john
#!/bin/sh
echo "to run john the ripper, cd into /share/john/run and run the tools from there!"
exit 1
EOF
chmod +x "$dest"/bin/john

